import Vue from 'vue'
import App from './App.vue';
import Vant from 'vant';
import VueRouter from 'vue-router';
import router from '@/router';
import moment from 'moment';
import Vuex from 'vuex';
import storeConfig from '@/store';
import NavBar from '@/components/nav-bar'
import ArticleList from '@/components/article-list';
import 'vant/lib/index.css';
import '@/assets/style/main.less'

Vue.component('NavBar', NavBar)
Vue.component('ArticleList', ArticleList);

Vue.use(Vuex);

// 全局设置moment语言
moment.locale('zh-cn');
// console.log(moment(1658482134742).fromNow());

// 配置路由
Vue.use(VueRouter)
// 全局注册Vant组件
Vue.use(Vant);

Vue.config.productionTip = false;

new Vue({
  // 挂载路由
  router,
  // 挂载store
  store: new Vuex.Store(storeConfig),
  render: h => h(App),
}).$mount('#app')
